<template>
  <div id="app">
    <!-- 导航栏 -->
    <NavBar v-if="$route.meta.showNavBar"></NavBar>
    <!-- 联系我们 -->
    <MyAuthor v-if="$route.meta.showNavBar"></MyAuthor>
    <!-- 应用路由 -->
    <router-view class="app_router"></router-view>
    <!-- 底部栏 -->
    <MyFooter v-if="$route.meta.showNavBar"></MyFooter>
  </div>
</template>

<script>
import { mapActions } from "vuex"; // 快速发送

export default {
  name: "App",
  methods: {
    ...mapActions("tags", { menu: "menu_content" }),
    ...mapActions("user", { updateUserInfo: "updateUserInfo" }),
  },
  mounted() {
    this.menu();
    this.updateUserInfo();
  },
};
</script>

<style lang="less">
@import "./assets/css/index.less";
@media screen and (max-width: 375px) {
  .navbar-container {
    .webapp-menu-dropdown {
      .text-start {
        font-size: 14px !important;
      }
      .webapp-menu-title {
        font-size: 12px !important;
        margin-right: 10px !important;
      }
      .webapp-menu-label-box {
        font-size: 12px !important;
        margin: 0 8px 8px 0 !important;
      }
    }
  }
  .webapp-search {
    .icon-fangdajing {
      left: 14px !important;
      top: 6px !important;
    }
    & > input {
      font-size: 12px !important;
    }
  }
}
@media screen and (min-width: 375px) {
  .my_content_container,
  .app_router {
    .my_content_container_end {
      .my_content_container_sidebar {
        padding: 0 6px !important;
        .sidebar_item {
          margin-right: 14px !important;
        }
      }
    }
  }
}
@media screen and (max-width: 440px) {
  .el-message {
    padding: 12px 8px !important;
    min-width: 274px !important;
  }
  // 首页
  .community-container {
    // 首页标题宣传语
    .community-article-container {
      .bg-hint {
        height: 144px !important;
      }
      .text-box {
        padding: 0 20px !important;
        .text-title {
          font-size: 24px !important;
        }
        .text-subtitle {
          font-size: 13px !important;
          line-height: 24px;
        }
      }
    }
  }
  // 末尾
  .footer-container {
    padding: 0 !important;
    font-size: 12px !important;
    .footer-nav {
      justify-content: center !important;
      .footer_nav_start_item {
        display: none;
      }
      .footer-nav-end {
        display: none !important;
      }
    }
  }
  // 文章展示全局组件
  .article-item {
    padding: 14px 0 !important;
    .titile {
      font-size: 16px !important;
    }
    .article-container {
      height: 64px !important;
      .article-container-image {
        max-width: 64px !important;
        max-height: 64px !important;
        min-width: 64px !important;
        min-height: 64px !important;
      }
      .article-container-text-description {
        font-size: 12px !important;
        height: 36px !important;
      }
      .article-container-text-bottom {
        font-size: 12px !important;
        i {
          font-size: 12px !important;
        }
        .text-bottom-start {
          width: 100% !important;
        }
        .text-bottom-end {
          display: none !important;
        }
      }
    }
  }
}
@media screen and (max-width: 640px) {
  // 首页
  .community-container {
    .bg-hint {
      height: 120px !important;
    }
    .text-box {
      .text-title {
        font-size: 24px !important;
      }
      .text-subtitle {
        font-size: 13px !important;
        line-height: 24px;
      }
    }
    // 详情页
    .community-detail-container {
      .end_article_content {
        .end_article_markdown {
          padding: 10px 18px !important;
        }
      }
    }
  }
  // 首页文章展示区域
  .article-item {
    padding: 14px 0 !important;
    .titile {
      font-size: 16px !important;
    }
    .text-bottom-start {
      width: 200px !important;
    }
    .article-container {
      height: 64px !important;
      .article-container-image {
        max-width: 64px !important;
        max-height: 64px !important;
        min-width: 64px !important;
        min-height: 64px !important;
      }
      .article-container-text-description {
        font-size: 12px !important;
        height: 36px !important;
      }
      .article-container-text-bottom {
        font-size: 12px !important;
        i {
          font-size: 13px !important;
        }

        .text-bottom-end {
          display: flex;
          max-width: 70px !important;
        }
      }
    }
  }
  // 末尾
  .footer-container {
    padding: 0 !important;
    font-size: 12px !important;
    .footer-nav {
      justify-content: center !important;
      .footer_nav_start_item {
        display: none;
      }
      .footer-nav-end {
        display: none !important;
      }
    }
  }
  .community_article {
    .el-skeleton {
      padding: 0 20px;
      .el-skeleton__p {
        height: 16px !important;
      }
      .template_item {
        padding: 20px 0;
        margin: 0 !important;
        border-bottom: 1px solid #e1e1e1;
      }
      .community_article_item {
        display: flex;
        margin-top: 4px;
        .community_article_container {
          padding-left: 14px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
        }
        & > div {
          &:last-of-type {
            flex: auto;
          }
        }
        .el-skeleton__text {
          height: 13px !important;
        }
        .el-skeleton__image {
          width: 64px !important;
          height: 64px !important;
        }
      }
    }
  }
}
@media screen and (max-width: 768px) {
  // 个人中心页
  .my_content_container {
    padding: 8px 6px 0 !important;
    .text_active {
      display: block !important;
    }
    .text_active2 {
      display: none !important;
    }
    .userInfo_avatar {
      .userInfo_pic_box {
        width: 100%;
        height: auto !important;
        border-radius: 6px 6px 0 0 !important;
        overflow: hidden;
        img {
          /* 水平垂直居中 */
          position: static !important;
          top: 50%;
          left: 0;
          transform: none !important;
        }
      }
      .avatar {
        width: 80px !important;
        height: 80px !important;
        left: 12px !important;
        bottom: 60px !important;
      }
      .box-card {
        padding-top: 4px !important;
      }
      .userInfo_base {
        margin-left: 102px !important;
        padding-bottom: 30px;
        min-height: 100px;
        .nickName {
          font-size: 16px !important;
          height: auto !important;
          margin-bottom: 8px;
        }
        .description {
          font-size: 12px !important;
          height: auto !important;
          margin-bottom: 0;
          padding-right: 9px;
        }
      }
      .concernBox {
        right: 8px !important;
        top: 6px !important;
        .concern {
          padding: 4px 8px !important;
        }
        .private {
          padding: 4px 8px !important;
        }
      }
    }
    .my_content_container_end {
      .my_content_container_sidebar {
        position: static !important;
        width: 100vw !important;
        display: flex;
        padding: 0 10px 0 !important;
        margin-bottom: 10px;
        .sidebar_item {
          flex: auto !important;
          height: 20px !important;
          line-height: initial !important;
          border: none !important;
          padding: 0 !important;
          overflow: hidden;
          display: flex;
          flex-direction: column !important;
          &:last-of-type {
            margin-right: 0 !important;
          }
          .icon {
            display: none !important;
          }
        }
      }
      .my_content_container_router {
        margin-left: 0px !important;
      }
    }
    // 个人中心高度
    .my_content_container_router {
      min-height: auto !important;
      padding-bottom: 100px;
    }
    // 信息概况页
    .MyInfo {
      .userInfo_overview {
        & > div {
          padding: 12px 8px !important;
          font-size: 14px !important;
          .uname {
            font-size: 14px !important;
          }
        }
        .about {
          .overview_left {
            width: 83% !important;
          }
        }
      }
      .userInfo_sidebar {
        li {
          height: auto !important;
          padding: 14px 10px !important;
          position: relative;
          .userInfo_sidebar_icon {
            i {
              position: absolute;
              right: -13px;
              top: -16px;
              font-size: 44px !important;
            }
          }
        }
        .userInfo_sidebar_title {
          font-size: 14px !important;
        }
        .userInfo_sidebar_count {
          font-size: 20px !important;
        }
        .userInfo_sidebar_subtitle {
          font-size: 12px !important;
        }
      }
    }
    // 个人资料页
    .baseInfo {
      padding-top: 6px !important;
      .baseInfo_right {
        display: none !important;
      }
      .baseInfo_title {
        padding-right: 14px !important;
        .baseInfo_msg {
          font-size: 14px !important;
          margin-left: 4px;
        }
      }
      .baseInfo_content {
        padding: 20px !important;
        font-size: 14px !important;
        & > div {
          margin: 0 !important;
          margin-bottom: 14px !important;
          .uname {
            width: 56px !important;
            margin-right: 24px !important;
          }
        }
      }
    }
    // 相关文章
    .center_article_container {
      width: 100vw !important;
      padding-right: 14px !important;
    }
    // 首页文章展示区域
    .article-item {
      padding: 14px 0 !important;
      .titile {
        font-size: 16px !important;
      }
      .text-bottom-start {
        width: 200px !important;
      }
      .article-container {
        height: 64px !important;
        .article-container-image {
          max-width: 64px !important;
          max-height: 64px !important;
          min-width: 64px !important;
          min-height: 64px !important;
        }
        .article-container-text-description {
          font-size: 12px !important;
          height: 36px !important;
        }
        .article-container-text-bottom {
          font-size: 12px !important;
          i {
            font-size: 13px !important;
          }

          .text-bottom-end {
            display: flex;
            max-width: 70px !important;
          }
        }
      }
    }
    .my_pagination_container {
      padding-bottom: 0 !important;
      li,
      button {
        font-size: 12px !important;
        min-width: auto !important;
        line-height: normal !important;
        height: auto !important;
        width: auto !important;
        padding: 0 6px !important;
      }
      i {
        font-size: 12px !important;
      }
    }
  }
  // 粉丝关注页
  .center_attention_container {
    .attention_avatar {
      min-width: 64px !important;
      max-width: 64px !important;
      min-height: 64px !important;
      max-height: 64px !important;
    }
    .attention_userInfo {
      .infoBox {
        margin-bottom: 4px !important;
        .attention_userInfo_title {
          font-size: 14px !important;
        }
        .attention_userInfo_description {
          margin-top: 0 !important;
          font-size: 12px !important;
        }
      }
      .attention_userInfo_baseinfo {
        font-size: 12px !important;
      }
    }
    .attention_list {
      padding-bottom: 10px !important;
      min-height: 94px !important;
    }
    .attention_tools {
      .concern {
        width: 54px !important;
        height: 24px !important;
        a {
          line-height: 24px !important;
        }
      }
    }
  }
  .center_history_container {
    padding-right: 16px !important;
    .clearHistory {
      right: 16px !important;
    }
    .el-timeline {
      padding-left: 20px !important;
    }
    .history_item {
      padding: 12px !important;
    }
    .author_avatar {
      width: 24px !important;
      height: 24px !important;
    }
    .author_name {
      margin-left: 2px;
      line-height: 24px;
    }
  }
  .attention_tools {
    .cancel {
      display: block !important;
    }
    .cancel2 {
      display: none !important;
    }
  }
  // 详情页
  .community-detail-container {
    .end_article_content {
      .detail_mobile_author {
        span {
          font-size: 12px !important;
        }
      }
      .info_user {
        display: none !important;
      }
      .article_info {
        & > div {
          margin-right: 16px !important;
        }
      }
    }
    .comment-title {
      span {
        font-size: 16px;
      }
    }
  }
}
@media screen and (min-width: 768px) {
  // 个人中心骨架屏
  .my_content_container {
    .el-skeleton {
      .content_container {
        padding-top: 40px;
        display: flex;
        .center_list {
          padding: 0 !important;
          width: 220px;
          display: flex;
          flex-direction: column !important;
          .el-skeleton__text {
            width: 100% !important;
            height: 36px !important;
            margin-bottom: 12px !important;
          }
        }
        .center_content {
          padding: 0 0 0 20px !important;
          flex: auto;
          & > div {
            & > div {
              &.center_content_item {
                .el-skeleton__item {
                  height: 32px !important;
                  margin-bottom: 20px;
                  &:first-of-type {
                    width: 16% !important;
                  }
                }
              }
            }
          }
        }
      }
      .el-skeleton__image {
        height: 240px !important;
      }
      .template_item {
        .community_article_item {
          .avatarImage {
            .el-skeleton__image {
              width: 112px !important;
              height: 112px !important;
              margin-left: 32px;
            }
          }
        }
      }
      .community_article_item {
        display: flex;
        margin-top: 10px;
        .community_article_container {
          margin-left: 20px;
          width: 100%;
          & > div {
            .title {
              .el-skeleton__text {
                height: 20px !important;
                &:first-of-type {
                  width: 70% !important;
                }
                &:last-of-type {
                  width: 20% !important;
                }
              }
            }
            .description {
              .el-skeleton__text {
                margin-top: 6px;
                height: 16px;
              }
            }
          }
        }
      }
    }
  }
  .community-detail-container {
    .detail_mobile_author {
      display: none !important;
    }
  }
}
</style>
